<template>
        <a-form-item :label="config.label">
      <a-input  v-model="form[config.prop]" :type="config.inputType || 'text'" :placeholder="config.placeholder || '请输入'" @change="onChange"/>
    </a-form-item>
</template>
<script>
export default{
     name: 'FormInput',
    props: {
        form: {
          type: Object,
           default: () => ({})
         },
        config: {
            type: Object,
            default: () => ({})
        }
  },
    methods: {
    onChange() {
      this.$emit('change', this.form[this.config.prop], this.config)
    }
  }
}
</script>